package com.yy.net.event 
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author jj043
	 */
	public class SocketEvent extends Event
	{
		//连接成功
		public static const CONNECT_SUCCESS:String = "connectsuccess";
		//连接失败
		public static const CONNECT_FAILURE:String = "connectfailure";
		
		
		//参数
		private var _param:Object = null;
		
		
		/**
		 * 构造
		 * @param type
		 * @param param
		 * @param bubbles
		 * @param cancelable
		 */
		public function SocketEvent(type:String,param:Object=null,bubbles:Boolean=false,cancelable:Boolean=false) 
		{
			_param = param;
			super(type, bubbles, cancelable);
		}
		
		
		/**
		 * 克隆
		 * @return
		 */
		override public function clone():Event
		{
			return new SocketEvent(type,param,bubbles,cancelable);
		}
		
		/**
		 * 转化为文本
		 * @return
		 */
		override public function toString():String
		{
			return formatToString("SocketEvent", "param", "type", "bubbles", "cancelable", "eventPhase");
		}
		
		/**
		* 参数
		*/
		public function get param():Object
		{
			return _param;
		}
	}
	
}